home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / wais / ir-book-sources / mphf / pmrandom.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-07  |  840 b   |  26 lines

  1. /******************************  pmrandom.h  ***************************
  2.  
  3.   Purpose:    External declarations for random-number generator
  4.           package used by this program.
  5.  
  6.   Provenance:    Written and tested by Q. Chen and E. Fox, March 1991.
  7.           Edited by S. Wartik, April 1991.
  8.  
  9.   Notes:    The implementation is better than the random number
  10.           generator from the C library.  It is taken from Park and
  11.         Miller's paper, "Random Number Generators: Good Ones are
  12.         Hard to Find," in CACM 31 (1988), pp. 1192-1201.
  13. **/
  14.  
  15. #ifdef __STDC__
  16. extern void    setseed(int);    /* Set the seed to a specified value.       */
  17. extern int    pmrandom();    /* Get next random number in the sequence. */
  18. extern int    getseed();    /* Get the current value of the seed.       */
  19. #else
  20. extern void    setseed();
  21. extern int    pmrandom();
  22. extern int    getseed();
  23. #endif
  24.  
  25. #define    DEFAULT_SEED    23
  26.